﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PasswordRecovery.aspx.cs" MasterPageFile="~/Mobile.master"
    Inherits="PasswordRecovery" Async="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<form id="form1" runat="server">
<section>
<header id="header">
<nav id="nav">
<a href="Login.aspx"><div class="branding"></div></a>
<div class="nav">
<a href="default.aspx"><asp:Image ID="imgTop" runat="server" ImageUrl="<%$Resources:CarInsurance,TopNavBack%>" Width="49" Height="29" AlternateText="Start" BorderWidth="0" /></a></div>
</nav>
</header>
</section>
<section id="body">
<div class="body">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<!-- Column Content | Start -->
<div class="form">
                        <div class="top">
                        </div>
                        <div class="form white">
                            <div>
                                <h1>
                                    <%=GetGlobalResourceObject ("Menu","PasswordRecovery") %>:</h1>
                                <div>
                                </div>
                                <div id="CarForm">
                                    <div>
                                        <asp:Label Width="270px" ID="lblPasswordLine" runat="server" Text="<%$ Resources:Menu,PasswordRecoveryLine%>" />
                                        <br />
                                    </div>
                                    <div>
                                    </div>
                                    <div>
                                        <asp:Label ID="lblMessage" ForeColor="Red" runat="server"></asp:Label>
                                        <asp:ValidationSummary ID="ValidationSummary1" CssClass="errorSummary" HeaderText="<%$ Resources:Menu,RequiredField%>"
                                            runat="server" ValidationGroup="customer" />
                                    </div>
                                    <div>
                                    </div>
                                    <!-- Form | Start   -->
                                    <asp:Panel runat="server" ID="pnlPasswordRecovery" DefaultButton="btnSubmit">
                                        <br />
                                        <div>
                                            <div >
                                                <%=GetGlobalResourceObject ("Menu","EnterEmail") %></div>
                                            <div >
                                                <html5:emailinput ID="txtEmail" runat="server" Text="<%$Resources:CarInsurance,YourEmail%>" CssClass="input" Width="200px"></html5:emailinput>
                                                <asp:RequiredFieldValidator ID="rfvEmail" runat="server" ControlToValidate="txtEmail"
                                                    Display="Dynamic" ErrorMessage="" Text="" ValidationGroup="customer" CssClass="validationErrorControl">
                                                </asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="rfvEmailValid" runat="server" ControlToValidate="txtEmail"
                                                    Display="Dynamic" ErrorMessage="" CssClass="validationErrorControl" Text=""
                                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="customer"></asp:RegularExpressionValidator>
                                            </div>
                                        </div>
                                        <br />
                                        <br />
                                        <div>
                                            <div >
                                                <%=GetGlobalResourceObject("Menu", "SecurityCheck")%></div>
                                            <div >
                                                <asp:UpdatePanel runat="server" ID="uplCAPCHA">
                                                    <ContentTemplate>
                                                        <div style="display: block; ">
                                                            <asp:Image ID="imgCAPTCHA" runat="server" AlternateText="captcha" />
                                                        </div>
                                                        <asp:ImageButton ID="btnNewImage" runat="server" OnClick="btnNewImage_Click" ImageUrl="~/images/icon/refresh.gif" 
                                                            ToolTip="Reload" AlternateText="Refresh" />
                                                   </ContentTemplate>
                                                </asp:UpdatePanel>
                                                <asp:UpdateProgress AssociatedUpdatePanelID="uplCAPCHA" DisplayAfter="100" runat="server"
                                                    ID="udpCAPTCHA">
                                                    <ProgressTemplate>
                                                        <asp:Image ID="imgLoading" ImageUrl="~/images/loader/loader_main.gif" runat="server" AlternateText="loading" />
                                                    </ProgressTemplate>
                                                </asp:UpdateProgress>
                                            </div>
                                        </div>
                                        <br />
                                        <br />
                                        <div>
                                            <div >
                                                <%=GetGlobalResourceObject("Menu", "TextinBox")%></div>
                                            <div >
                                                <asp:UpdatePanel ID="uplSecurityCode" runat="server">
                                                    <ContentTemplate>
                                                        <span class="indicator">
                                                            <asp:TextBox ID="txtSecurityCode" Width="200px" MaxLength="20" runat="server"></asp:TextBox>
                                                        </span><span class="indicator">
                                                            <asp:RequiredFieldValidator ID="rfvSecurityCheck" runat="server" ControlToValidate="txtSecurityCode"
                                                                Display="Dynamic" ErrorMessage="" CssClass="validationErrorControl" Text=""
                                                                ValidationGroup="customer"></asp:RequiredFieldValidator>
                                                        </span>
                                                    </ContentTemplate>
                                                </asp:UpdatePanel>
                                            </div>
                                        </div>
                                        <div class="seperator_form">
                                        </div>
                                        <div class="seperator_15px">
                                        </div>
                                        <div>
                                            <div>
                                                &nbsp;
                                            </div>
                                            <div >
                                                <asp:Button ID="btnSubmit" onmousedown="this.className = 'button_recoverpassword_mousedown';"
                                                    onmouseup="this.className = 'button_recoverpassword';" onmouseout="this.className = 'button_recoverpassword';"
                                                    CssClass="button_recoverpassword" runat="server" OnClientClick="LoadValidationErrorCss();if (Page_ClientValidate('customer')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}"
                                                    OnClick="btnSubmit_Click" ValidationGroup="customer" />
                                            </div>
                                        </div>
                                    </asp:Panel>
                                    <!-- Form | End   -->
                                </div>
                            </div>
                        </div>   
                        <div class="bottom"> 
                        </div>
                        </div>
<!-- Column Content | End   -->
</div><input id="inputLang" value="" style="display:none;" />
</div> 
</section>
</form>
<script type="text/javascript">
    <!--
    function RemoveSpace(c) {
        c.value = c.value.split(' ').join('')
    }
    //-->

    function DefaultEmail(TextBoxControl, TextBoxEvent) {
        if (TextBoxControl.value.length == 0 && TextBoxEvent.type == "blur") {
            if (document.getElementById('inputLang').value == 'EN') {
                TextBoxControl.value = "Your E-mail address ...";
            }
            else {
                TextBoxControl.value = "อีเมล์";
            }

        }
        //alert("default email.");
    }

    function ClearText(TextBoxControl, TextBoxEvent) {
        if (TextBoxControl.value == "Your E-mail address ...") {
            TextBoxControl.value = "";
            document.getElementById('inputLang').value = 'EN'
        }
        if (TextBoxControl.value == "อีเมล์") {
            TextBoxControl.value = "";
            document.getElementById('inputLang').value = 'TH'
        }
    }
    
    </script>

</asp:Content>